﻿<div ng-controller="roleController">
    <form ng-submit="save()">
        <input type="text" ng-model="role.name" placeholder="Nombre" required>
        <input type="text" ng-model="role.description" size="2" placeholder="Descrición">
        <button type="submit">Save</button>
        <div data-ng-hide="message == ''" data-ng-class="(savedSuccessfully) ? 'alert alert-success' : 'alert alert-danger'">
            {{message}}
        </div>
    </form>

    <ul>
        <li ng-repeat="d in list | filter:name">
            {{ d.name }} {{ d.description }} {{d.id}}
            <a href="" ng-click="getById(d)">update</a>
            <a href="" ng-click="delete(d)">x</a>
        </li>
    </ul>
</div>
